package com.slt.linux;

public class Test2 {
    public static int hailstone(int n) {
        int count = 0;
        count++;
        if (n % 2 != 0) {
            n = 3 * n + 1;
            hailstone(n);
        } else if (n % 2 == 0) {
            n = n / 2;
            hailstone(n);
        }else if(n == 1){
            return count;
        }
        return count;
    }
    public static void main(String[] args) {
        int hailstone = hailstone(5);
        System.out.println(hailstone);
    }

}
